<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>contextmenu插件</title>
<script type="text/javascript" src="lib/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="lib/jquery.contextmenu.r2.js"></script>
<style type="text/css">
	body{font-size:13px}
</style>
<script type="text/javascript">
	$(function(){
		$("#txtContent").contextMenu('sysMenu',{bindings:{'Li1':function(Item){
			alert("在ID号为:"+Item.id+"编辑框中，您点击了\"新建\"项");
		},
		'Li2':function(Item){
			alert("在ID号为："+Item.id+"编辑框中，您点击了\"打开\"项")
		}
		}});
	})
	
	
</script>
</head>
<body>
	<div class="divFrame">
		<div class="divTitle">点击右键</div>
		<div class="divContent">
			<textarea id="txtContent" cols="40" rows="5"></textarea>
		</div>
	</div>
	<div class="contextMenu" id="sysMenu">
		<ul>
			<li id="Li1">新建</li>
			<li id="Li2">打开</li>
		</ul>
	</div>


</body>
</html>